<template>
  <div class="history-playlist-item">
    <div class="left">
      <img :src="item.coverImgUrl | completeImageUrl" alt="" />
    </div>

    <div class="middle">
      <div class="top e_1">{{ item.name }}</div>
      <div class="bottom">{{ item.tracks.length }}首</div>
    </div>

    <div
      class="right"
      @click="
        $store.commit('deleteOnePlaylistInPlaylistFootprints', { item })
      "
    >
      ✖
    </div>
  </div>
</template>

<script>
export default {
  name: "HistoryPlaylistItem",
  props: {
    item: Object,
  },
};
</script>

<style lang="less" scoped>
.history-playlist-item {
  width: 100%;
  height: 50px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;

  .left {
    width: 50px;
    height: 100%;

    img {
      border-radius: 10px;
    }
  }

  .middle {
    flex: 1;
    margin-left: 20px;

    .bottom {
      font-size: 12px;
      color: #707070;
    }
  }
}
</style>
